package web.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Collection;

@Getter
@Setter
@ToString
public class BaseTree<T, ID> implements Serializable {
	private static final long serialVersionUID = -1303986834600572016L;

	@Schema(description = "主键 ID")
	ID id;

	@Schema(description = "父 ID")
	ID parentId;

	@Schema(description = "是否含有子节点")
	boolean hasChild;

	@Schema(description = "子节点集合")
	Collection<T> children;
}